home *** CD-ROM | disk | FTP | other *** search
/ Strategy Challenges Collection / Strategy Challenges Collection.iso / mac / DemoData / MENU.Dxr / 00261.ls < prev    next >
Encoding:
Text File  |  1996-10-02  |  1.5 KB  |  61 lines

  1. on mouseDown
  2.   global gAbort
  3.   puppetSound(0)
  4.   set gAbort to 0
  5.   put clickOn()
  6.   set tempName2 to the name of cast the castNum of sprite clickOn()
  7.   if item 2 of tempName2 <> "roll" then
  8.     exit
  9.     dontPassEvent()
  10.   end if
  11.   set tempName to chars(tempName2, 1, length(tempName2) - 5)
  12.   set tempUp to the number of member tempName2
  13.   set tempDown to the number of member (tempName & "_DN")
  14.   set the castNum of sprite clickOn() to tempDown
  15.   updateStage()
  16.   sound stop 1
  17.   sound stop 2
  18.   puppetSound("clickSound")
  19.   updateStage()
  20.   repeat while the stillDown
  21.     if rollOver(clickOn()) then
  22.       if the castNum of sprite clickOn() <> tempDown then
  23.         set the castNum of sprite clickOn() to tempDown
  24.         updateStage()
  25.         set gAbort to 0
  26.       end if
  27.       next repeat
  28.     end if
  29.     set the castNum of sprite clickOn() to tempUp
  30.     updateStage()
  31.     set gAbort to 1
  32.     go(the frame)
  33.   end repeat
  34.   if not gAbort then
  35.     puppetSound("clickSound")
  36.     updateStage()
  37.     repeat while soundBusy(1)
  38.       nothing()
  39.     end repeat
  40.     updateStage()
  41.     puppetSound(0)
  42.   end if
  43.   set the castNum of sprite clickOn() to tempUp
  44.   updateStage()
  45. end
  46.  
  47. on mouseUp
  48.   global gAbort
  49.   if gAbort = 0 then
  50.     set tempJump to the name of cast the castNum of sprite clickOn()
  51.     if tempJump <> "Tthings2" then
  52.       exit
  53.     end if
  54.     set jumpName to chars(tempJump, 1, length(tempJump) - 5)
  55.     clearPuppets(2, 12)
  56.     go(the frame + 1)
  57.     puppetSound(0)
  58.     PlayDemoFrame(1, jumpName)
  59.   end if
  60. end
  61.